requireJS(['constant', 'site', 'handlebars', 'public', 'static/js/page/customermanager/customerlist/common/common.js'], function (Constant, site, Handlebars, Public, Common) {
    Common.init();


    Common.queryList(1);


    $(".serach_btn").on('click',function(){
        Common.queryList(1,1);
    })


    //新增跟踪日志弹窗
    $(".trace_log_add").click(function () {
        state = 'new';
        newAndEditTraceLogWindow('new', 0);
    })

    //新增和编辑弹框
    function newAndEditTraceLogWindow(state, content) {

        $(".add_trace_log_window").css("display", "block");
        if (state == 'new') {
            $(".newAndEditLog_title").text("新增客户跟踪日志")
            $(".newAndEditLog_content").html("<span style='color: red;'>*</span>新增的日志内容：")
            $(".add_trace_log_text").val('')


        }
        if (state == 'edit') {
            $(".add_trace_log_text").val(content)
            $(".newAndEditLog_title").text("编辑客户跟踪日志")
            $(".newAndEditLog_content").html("<span style='color: red;'>*</span>编辑的日志内容:")


        }
    }
})
